﻿{include file="public/header" /}
<title></title>
	<head>
		<meta charset="utf-8" />
		<title>记录</title>
		<link rel="stylesheet" href="__OEM__/css/iconfont.css" />
		<link rel="stylesheet" href="__OEM__/css/css.css" />
	</head>

<body>
	<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 财务管理 <span class="c-gray en">&gt;</span> <a href="{:url('balance_logs')}">资金记录</a>
		<a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
	</nav>
	<div class="page-container">
	<div class="page-container">
		<form class="form form-horizontal" id="form-admin-add" method="post" style="width: 45%;">
            <div class="row cl">
            	<label class="form-label col-xs-2">选择时间：</label>
	            <div class="layui-inline">
				    <div class="layui-input-inline">
				       <input {if isset($begin_time)} value='{$begin_time}'{/if} type="text" class="layui-input" name="begin_time" id="begin_time" placeholder="yyyy年MM月dd日">
				    </div>
				</div>
	                <i class="chax_line"></i>
	            <div class="layui-inline">
				    <div class="layui-input-inline">
				    <input {if isset($end_time)} value='{$end_time}'{/if} type="text" class="layui-input" name="end_time"  id="end_time" placeholder="yyyy年MM月dd日">
				    </div>
				</div>
				<button type="submit" style="width:50px;height: 25px;">搜索</button>
			 </div>
		</form>
		<div class="chax_xzbtnbox">	
			<a href="#" onclick="check()"><i class="iconfont icon-daochu"></i>导出</a>
		</div>
	</div>
	累计购买{$czs} 累计提现{$txze}
	<table class="table table-border table-bordered table-bg">
		<thead>
<tr class="text-c">
				<th>购买类型</th>
				<th>编号</th>
				<th>购买金额</th>
				<th>手续费</th>
				<th>实际到账金额</th>
				<th>详细</th>
				<th>到账鼓励金</th>
				<th>交易时间</th>
			</tr>
		</thead>
		<tbody>
			{volist name="list" id="vo" }
			<tr class="text-c">
				<td>{if $vo.order_type==5}商家{elseif $vo.order_type==8}会员{else}oem{/if}</td>
				<td>{if $vo.order_type==5}{$vo.agent_id}{elseif $vo.order_type==8}{$vo.uid}{else}{$vo.oem_id}{/if}</td>
				<td>{$vo['balance']}</td>
				<td>{$vo['balance']*0.25/100}</td>
				<td>{$vo['balance']*99.75/100}</td>
				<td>{$vo['message']}</td>
				<td>{$vo['balance']}</td>
				<td>{$vo.add_time}</td>
			</tr>
			{/volist}
			</tbody>
			</table>
			<div class="fenye" style="display: block;">
				{$list->render()}
			</div>
		</div>
		
		{include file="public/footer" /}
		<script type="text/javascript">
			/*审核跳转*/
			function tx_operate(title, url, w, h) {
				layer_show(title, url, w, h);
			}
		
			/*审核*/
			function tx_operate1(obj, id) {
				$.ajax({
					type: 'get',
					url: "{:url('sys/tx_operate')}",
					dataType: 'json',
					data: {
						id: id
					},
					success: function(data) {
						if(data.code == 200) {
							$(obj).parents("tr").remove();
							layer.msg(data.msg, {
								icon: 1,
								time: 1000
							});
						} else {
							layer.msg(data.msg, {
								icon: 1,
								time: 1000
							});
						}
					},
					error: function(data) {
						console.log(data.msg);
					}
				});
			}

		</script>
<link rel="stylesheet" href="__PUBLIC__/static/layui/css/layui.css">
<script src="__PUBLIC__/static/layui/layui.all.js"></script>
<script>
	layui.use('laydate', function(){
		var laydate = layui.laydate;
		
		//日期控件
		laydate.render({
		    elem: '#begin_time'
		    ,type: 'datetime'
		    ,format: 'yyyy-MM-dd HH:mm:ss'
		});
		  
		laydate.render({
		    elem: '#end_time'
		    ,type: 'datetime'
		    ,format: 'yyyy-MM-dd HH:mm:ss'
		});
		
	})
	$("#div_pingci .level_fl").click(function(){
		$("#div_pingci .level_fl").removeClass("active");
		$(this).addClass("active");
		$("#pingci").val($(this).data("id"));
	})	
	$("#div_nengli .level_fl").click(function(){
		$("#div_nengli .level_fl").removeClass("active");
		$(this).addClass("active");
		$("#nengli").val($(this).data("id"));
	})
	
	//导出
	function check() {
		var begin_time = $('#begin_time').val();
		var end_time = $('#end_time').val();		
		window.location.href = "/admin/index/cz_dc.html?begin_time=" + begin_time + "&end_time=" + end_time;
	}
</script>